<#assign menuId=3>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>打样通知单-${Application.systemName!}</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="../css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="../css/AdminLTE.css" rel="stylesheet" type="text/css" />
        <!--datetimerpicker-->
        <link rel="stylesheet" type="text/css" href="../css/datetimepicker/bootstrap-datetimepicker.min.css"/>
        <!-- bootstrap wysihtml5 - text editor -->
        <link href="../css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />
        <link href="../css/myself.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
            *{
                margin: 0;
                padding: 0;
            }
            .pull-left{
				border-left: 6px solid #3882FF;
				padding: 0 0 0 10px;
				font-size: 14px;
				font-weight: bold;
			}
			.nother{
				border: 1px solid #ccc; 
				padding: 6px 30px;
			}
			.style label{
				width: 15%;
			}
			.style label:nth-last-child{
				width: 5%;
			}
			.well{
	        	padding: 0;
	        	border: none;
	        	margin: 0;
	        	border-radius: 0;
	        	box-shadow: none;
	        	-webkit-box-shadow: none;
	        	background-color: white;
	        }
	        .table-bordered{
	        	border-collapse: collapse;
	        }
	       	.particulars{
	       		width: 100%;
	       		margin-top: 10px;
	       	}
	        a{
	        	cursor: pointer;
	        }
	        .row{
		        	padding: 0 0 0 20px;
		    }
		   	.gray, .red{
		   		font-size: 16px;
		   	}
		    /*新增样式*/
    		.ol_left{
	            width: 100%;
	            height: 30px;
	            line-height: 30px;
	            padding: 0;
	        }
	        .ol_left>li{
	            float: left;
	            margin-right: 5px;
	        }
	        .ol_left li, .ol_left{
	        	margin-bottom: 0;
	        }
	        .inpt tr td input{
	        	width: 100%;
	        	height: 100%;
	        	border: 0;
	        	text-align: center;
	        	display: inline-block;
	        }
	        .design_draft img{
	        	width: 100%;
	        	height: 10%;
	        	
	        }
	        .textA{
	        	overflow:scroll;
	        	overflow-y:hidden;
	        	overflow-x:hidden;
	        }
        </style>
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <#include "../header.html"/>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <#include "../menu.html"/>

            <!-- Right side column. Contains the navbar and content of the page -->
           <aside class="right-side">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>填写打样生产通知单</h1>
                    <ol class="ol_left">
		                <li>当前位置：</li>
		                <li><a href="list?pageNo=1">打样订单</a></li>
		                <li>> 填写打样生产通知单</li>
		            </ol>
		            <hr class="no-margin" />
            	</section>
                <!-- Main content -->
                <section class="content">

                    <div class='row'>
                        <div class='col-md-12'>
                        	<#list proofingPatterns as proofing>
                            <div class='box' style="padding: 20px;">
                                <div class="marginBottom center clearfix"> 
				               		<div class="pull-left">填写工厂交期</div>
				               		<div class="pull-right">
				               			<span style="margin-right: 20px; font-size: 16px;">共${proofingPatterns?size}件</span>
				               			<span class="gray">客户交期：</span>
				               			<#if proofing.remainingTime &gt; 0>
				               			<span class="red">剩余${proofing.remainingTime!}天</span>
				               			<#else>
				               			<span class="red">超期${proofing.remainingTime?abs!}天</span>
				               			</#if>
				               		</div>
				               	</div>
				               	<table class="border no-border pull-left" style="margin-bottom: 20px;width: 100%"> 
				               		<tr>
				               			<td width="8%" style="text-align: right; font-weight: normal">选择工厂：</td>
				               			<td width="15%">
				               				<select id="factoryId" class="form-control select2"> 
                  
								                  <option selected="selected" value="">请选择</option> 
								                  <#list factoryList as factory>
								                  <option value="${factory.id!}">${factory.name!}</option>
								                  </#list>
								                  
							                </select>
				               			</td>
				               			<td width="8%" style="text-align: right;font-weight: normal">工厂交期：</td>
				               			<td width="74%">
				               				<div class="well" style="width: 40%">
											  <div class="input-group date form_datetime col-md-11">
											  	<#if proofing.deliveryDate??>
												<input class="form-control" size="60" type="text" id="deliveryDate" value="${proofing.deliveryDate?string("yyyy-MM-dd HH:mm")}">
												<#else>
												<input class="form-control" size="60" type="text" id="deliveryDate">
												</#if>
												<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
											  </div>
											</div>
				               			</td>
				               			
				               		</tr>
				               	</table>
				               	
			               		
			               		
						       	<div class="clearfix"></div>
						       	
						       	<form action="#" method="get" class="center">
						       		<div class="pull-left marginBottom">填写样衣信息</div>
						           	
						           	<table class="table text-center table-bordered order-list">
					                   	<tr>
					                       	<td colspan="5" class="left-text">
					                       		<span hidden id="orderPatternId">${proofing.orderPatternId!}</span>
					                           	<span style="margin-right: 50px;">子订单号：${proofing.code!}</span>
					                           	<span>设计款号:${proofing.patternNo!}</span>
					                       	</td>
					                   	</tr>
				                        <td width="40%" style="min-width: 480px">
                                            <span class="Design_draft"><img src="${Application.accessFileUrl!}${proofing.mainImage!}" alt="" /></span>
                                        </td>
				                       	<td width="60%">
				                       		<table class="table table-bordered inpt">
				                       			<tr>
				                       				<th width="14%">颜色</th>
				                       				<th width="12%">XS</th>
				                       				<th width="12%">S</th>
				                       				<th width="12%">M</th>
				                       				<th width="12%">L</th>
				                       				<th width="12%">XL</th>
				                       				<th width="12%">总计</th>
				                       				<th width="14%"></th>
				                       			</tr>
				                       			<#list proofing.proofingPatternSizes as proofingPatternSize>
				                       			<tr>
				                       				<td style="padding: 0;"><input type="text" name="color" value="${proofingPatternSize.color!}"/></td>
				                       				<td style="padding: 0;"><input type="text" name="size" value="${proofingPatternSize.xsAmount!}"/></td>
				                       				<td style="padding: 0;"><input type="text" name="size" value="${proofingPatternSize.sAmount!}"/></td>
				                       				<td style="padding: 0;"><input type="text" name="size" value="${proofingPatternSize.mAmount!}"/></td>
				                       				<td style="padding: 0;"><input type="text" name="size" value="${proofingPatternSize.lAmount!}"/></td>
				                       				<td style="padding: 0;"><input type="text" name="size" value="${proofingPatternSize.xlAmount!}"/></td>
				                       				<td name="total">0</td>
				                       				<td>
				                       					<div class="red_circle delete" style="cursor: pointer;">
                                   							<div>
                                   								
                                   							</div>
                                   						</div>
				                       				</td>
				                       			</tr>
				                       			</#list>
				                       			<tr class="no_add">
                                   					<td colspan="8">
                                   						<div class="add" style="cursor: pointer;color: #3882ff;">+添加一行</div>
                                   					</td>
                                       			</tr>
				                       			<tr>
				                       				<td colspan="8"  class="right-text">
	                                                    <span class="pull-right">共<span id="count">1</span>件</span>
	                                                </td>	
				                       			</tr>
				                       			<tr>
				                       				<td colspan="8">
				                       					<table class="table table-bordered">
				                       						<tr>
				                       							<td>设计款式说明</td>
				                       							<td>
				                       								<div class="form-group textarea">
							                                            <textarea class="form-control" id="description" row=3 placeholder="输入设计款式说明" >${proofing.description!}</textarea>
							                                        </div> 
				                       							</td>
				                       						</tr>
				                       					</table>
				                       				</td>
				                       			</tr>
				                       		</table>
				                       	</td>
						           	</table>
	                                <div class=" custorm-view clearfix">
                                       	<span class="pull-left">款式细节明细</span>
	                               	</div>
	                                <div style="margin-top: 10px">
	                                    <form>
	                                        <textarea id="detailDescription" name="editor${proofing_index*2+1}" cols="80">
	                                        	<#if proofing.detailDescription?? && proofing.detailDescription!="">
	                                        	${proofing.detailDescription!}
	                                        	<#else>
	                                        	<table class="particulars" border="1" cellpadding="1" cellspacing="0" style="height:auto;">
													<tbody>
														<tr>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%; height:35px;">细节</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%;">描述</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%;">尺寸大小</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%;">位置</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%;">备注</th>
														</tr>
														<tr>
															<td style="text-align:center; height:35px;">扣子</td>
															<td style="text-align:center">用金属/树枝</td> 
															<td style="text-align:center">2.8cm</td>
															<td style="text-align:center">左肩</td>
															<td style="text-align:center">&nbsp;</td>
														</tr>
														<tr>
															<td style="text-align:center; height:35px;">下摆参数</td>
															<td style="text-align:center">针数参考图片</td>
															<td style="text-align:center">高7cm</td>
															<td style="text-align:center">下摆</td>
															<td style="text-align:center">针织工艺需与老朱细节沟通</td>
														</tr>
														<tr>
															<td style="text-align:center; height:35px;">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
														</tr>
													</tbody>
												</table>
	                                        	</#if>
	                                        </textarea>
	                                    </form>
	                                </div>
	                                <div class="custorm-view center clearfix">
	                                    <span class="pull-left"  style="margin: 20px 0 10px 0">面辅料明细</span>
	                               	</div>
	                                <div class='center marign-top'>
	                                    <form>
	                                        <textarea id="accessoryDetail" name="editor${proofing_index*2+2}" cols="80">
	                                        	<#if proofing.accessoryDetail?? && proofing.accessoryDetail!="">
	                                        	${proofing.accessoryDetail!}
	                                        	<#else>
	                                        	<table class="particulars" border="1px solid #ccc" cellpadding="0" cellspacing="0" style="height:auto;">
													<tbody>
														<tr>
															<th colspan="7" style="background-color:rgb(246, 246, 246); text-align:center; height:35px;">面料明细</th>
														</tr>
														<tr>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:12%; height:35px;">&nbsp;</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:11%">颜色</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:13%">面料名称</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:12%">成分</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:16%">供应商信息</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:16%">供应商编号</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%">所用部位</th>
														</tr>
														<tr>
															<td style="text-align:center; height:35px;">主身部</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">例如：牛仔/灯芯绒</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
														</tr>
														<tr>
															<td style="text-align:center; height:35px;">撞部</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
														</tr>
														<tr>
															<td style="text-align:center; height:35px;">里部</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
															<td style="text-align:center">&nbsp;</td>
														</tr>
													</tbody>
												</table>
												
												<table class="particulars" border="1px solid #ccc" cellpadding="0" cellspacing="0" style="height:auto;">
													<tbody>
														<tr>
															<th colspan="6" style="background-color:rgb(246, 246, 246); text-align:center; height:35px;">辅料明细</th>
														</tr>
														<tr>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:15%; height:35px;">辅料名称</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:15%">数量</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:15%">位置</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:15%">车法细节</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%">明细图片</th>
															<th style="background-color:rgb(246, 246, 246); text-align:center; width:20%">备注</th>
														</tr>
														<tr>
															<td style="text-align:center; width:15%; height:35px;">&nbsp;</td>
															<td style="text-align:center; width:15%">&nbsp;</td>
															<td style="text-align:center; width:15%">&nbsp;</td>
															<td style="text-align:center; width:15%">&nbsp;</td>
															<td style="text-align:center; width:20%">&nbsp;</td>
															<td style="text-align:center; width:20%">&nbsp;</td>
														</tr>
													</tbody>
												</table>
	                                        	</#if>
	                                        </textarea>
	                                    </form>
	                                </div> 
	                                <div class="clearfix center">
	                                	<div class="pull-left" style="margin: 20px 0 10px 0">折叠包装方法</div>
	                                </div>
	                                
	                                <table class="table center table-bordered">
	                                	<tr>
	                                		<td width="15%">折叠方法</td>
	                                		<td>
	                                			<div class="style">
                                    					
	                                    				<label for="nub1_1"><input type="radio" name="fold_${proofing_index}" id="nub1_1" value="轻烫" />轻烫</label>
	                                    				
	                                    				<label for="nub1_2"><input type="radio" name="fold_${proofing_index}" id="nub1_2" value="骨位烫" />骨位烫</label>
	                                    				
	                                    				<label for="nub1_3"><input type="radio" name="fold_${proofing_index}" id="nub1_3" value="正常烫" />正常烫</label>
	                                    				
	                                    				<label for="nub1_4"><input type="radio" name="fold_${proofing_index}" id="nub1_4" value="其他" />其他</label>
				                                        <input class="nother" id="fold" placeholder="Enter ..." type="text">
	                                			</div>
	                                		</td>
	                                	</tr>
	                                	<tr>
	                                		<td width="15%">包装方法</td>
	                                		<td>
	                                			<div class="style">
                                    					
	                                    				<label for="nub2_1"><input type="radio" name="package_${proofing_index}" id="nub2_1" value="雇装" />雇装</label>
	                                    				
	                                    				<label for="nub2_2"><input type="radio" name="package_${proofing_index}" id="nub2_2" value="挂装" />挂装</label>
	                                    				
	                                    				<label for="nub2_3"><input type="radio" name="package_${proofing_index}" id="nub2_3" value="企装" />企装</label>
	                                    				
	                                    				<label for="nub2_4"><input type="radio" name="package_${proofing_index}" id="nub2_4" value="其他" />其他</label>
				                                        <input class="nother" id="package" placeholder="Enter ..." type="text">
	                                			</div>
	                                		</td>
	                                	</tr>
	                                </table>
	                                
	                                
	                                <div class="clearfix center">
	                                	<div class="pull-left" style="margin: 20px 0 10px 0">验货</div>
	                                </div>
	                                
	                                <table class="table center table-bordered">
	                                	<tr>
	                                		<td width="15%">批版方法</td>
	                                		<td>
	                                			<div class="style">
                                    					
	                                    				<label for="nub3_1"><input type="radio" name="batch_${proofing_index}" id="nub3_1" value="客人批版" />客人批版</label>
	                                    				
	                                    				<label for="nub3_2"><input type="radio" name="batch_${proofing_index}" id="nub3_2" value="公司批版" />公司批版</label>
	                                    				
	                                    				<label for="nub3_3"><input type="radio" name="batch_${proofing_index}" id="nub3_3" value="其他" />其他</label>
				                                        <input class="nother" id="batch" placeholder="Enter ..." type="text">
	                                			</div>
	                                		</td>
	                                	</tr>
	                                	<tr>
	                                		<td width="15%">验货标准</td>
	                                		<td>
	                                			<div class="style">
                                    					
	                                    				<label for="nub4_1"><input type="radio" name="check_${proofing_index}" id="nub4_1" value="AQL1.5" />AQL1.5</label>
	                                    				
	                                    				<label for="nub4_2"><input type="radio" name="check_${proofing_index}" id="nub4_2" value="AQL2.5" />AQL2.5</label>
	                                    				
	                                    				<label for="nub4_3"><input type="radio" name="check_${proofing_index}" id="nub4_3" value="AQL4.0" />AQL4.0</label>
	                                    				
			                                    		<label for="nub4_4"><input type="radio" name="check_${proofing_index}" id="nub4_4" value="其他" />其他</label>
				                                        <input class="nother" id="check" placeholder="Enter ..." type="text">
	                                			</div>
	                                		</td>
	                                	</tr>
	                                	<tr>
                        					<td width="15%">测试要求</td>
                        					<td>
                        						<div class="form-group" style="margin-bottom: 0;">
		                                            <input class="form-control" id="testRequest" value="${proofing.testRequest!}" placeholder="Enter ..." type="text">
		                                        </div>
                        					</td>
                        				</tr>
	                                </table>
	                                <div class="clearfix center">
	                                	<div class="pull-left" style="margin: 20px 0 10px 0">备注</div>
	                                </div>
	                                
	                                <div class="form-group center">
	                                   <textarea class="form-control" row="3" id="memo" placeholder="Enter ...">${proofing.memo!}</textarea>
	                                </div>
	                                <div class="center">
	                                	<div class="pull-left no-border no-padding" style="margin: 20px 0 0 0">
		                                	<a href="javascript:history.back();" class="btn btn-default">取消</a>
		                                </div>
		                                <div class="pull-right" style="margin: 20px 0 0 0">
		                                	<#if proofing_index!=0>
		                                	<a href="#" class="btn btn-default" id="last" style="margin-right: 5px;">上一款</a>
		                                	</#if>
		                                	<#if proofingPatterns?size!=1>
		                                	<a href="#" class="btn btn-primary" id="next">共${proofing_index+1}/${proofingPatterns?size}款，
			                                	<#if proofing_index+1==proofingPatterns?size>
			                                	生成预览
			                                	<#else>
			                                	填写下一款
			                                	</#if>
		                                	</a>
		                                	<#else>
		                                	<#if index??>
		                                	<a href="#" class="btn btn-primary" id="next">确定修改</a>
		                                	<#else>
		                                	<a href="#" class="btn btn-primary" id="next">确定</a>
		                                	</#if>
		                                	</#if>
		                                </div>
		                                <div class="clear" style="clear: both;"></div>
	                                </div>    
	                           </form>
                            </div><!-- /.box -->
                        	</#list>
                        </div><!-- /.col-->
                    </div><!-- ./row -->
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
        <!-- jQuery 2.0.2 -->
        <style type="text/css"></style>
        
        <!-- jQuery 2.0.2 -->
        <script src="../js/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="../js/bootstrap.min.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="../js/AdminLTE/app.js" type="text/javascript"></script>
        <!-- AdminLTE for demo purposes -->      
        <!-- CK Editor -->
        <script src="../js/plugins/ckeditor/ckeditor.js" type="text/javascript"></script>
        <!-- Bootstrap WYSIHTML5 -->
        <script src="../js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
       	<script src="../js/plugins/datetimerpicker/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
       	<script src="../js/plugins/datetimerpicker/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
       	<script src="../js/order/proofing_notice.js" type="text/javascript"></script>
       <script type="text/javascript">
       	
            $(function() {
            	model.editor=[];
                // Replace the <textarea id="editor1"> with a CKEditor
                // instance, using default configuration.
                <#list proofingPatterns as proofing>
                model.editor[${proofing_index*2}]=CKEDITOR.replace('editor${proofing_index*2+1}');
                model.editor[${proofing_index*2+1}]=CKEDITOR.replace('editor${proofing_index*2+2}');
                </#list>
                //bootstrap WYSIHTML5 - text editor
                $(".textarea").wysihtml5();
            
            });
            
            
            $(function() {
    		    $('.form_datetime').datetimepicker({
    		    	format: 'yyyy-mm-dd hh:00',
    		    	language:  'zh-CN',  
    	            weekStart: 1,  
    	            todayBtn:  1,  
    	            autoclose: 1,  
    	            todayHighlight: 1,  
    	            startView: 2,  
    	            forceParse: 0,  
    	            showMeridian: 0,
    	            minView: 1,
    	            startDate: new Date()
    		    });
    		});
			
            $('.add').click(function () {
            	var tr=$('<tr><td style="padding:0"><input type="text" style="width:100%; height:100%; border:0;"/>'
   						+'</td><td style="padding:0"><input type="text" name="size" style="width:100%; height:100%; border:0"/></td>'
   						+'<td style="padding:0"><input type="text" name="size" style="width:100%; height:100%; border:0"/></td>'
   						+'<td style="padding:0"><input type="text" name="size" style="width:100%; height:100%; border:0"/></td>'
   						+'<td style="padding:0"><input type="text" name="size" style="width:100%; height:100%; border:0"/></td>'
   						+'<td style="padding:0"><input type="text" name="size" style="width:100%; height:100%; border:0"/></td>'
   						+'<td name="total">0</td>'
   						+'<td><div class="red_circle delete" style="cursor: pointer;"><div>	</div></div></td></tr>');
				$(this).parent().parent().before(tr);
				tr.find(".delete").click(deleteTr);
				tr.find('input[name="size"]').change(calculate);
			});
			
            $(function(){
            	var boxs=$('.box');
            	for(var i=0;i<boxs.length;i++){
            		var box=boxs.eq(i);
            		var tds=box.find('td[name="total"]');
                	var amount=0;
                	for(var j=0;j<tds.length;j++){
                		var inputs=tds.eq(j).prevAll().find('input[name="size"]');
                		total=0;
                		for(var k=0;k<inputs.length;k++){
                			var count=inputs.eq(k).val();
                			if(count&&!isNaN(count)){
                				total+=parseInt(count);
                			}
                		}
                		tds.eq(j).html(total);
                		amount+=total;
                	}
                	box.find('#count').html(amount);
            	}
            	
            })
            
            $(function(){
            	<#list proofingPatterns as proofing>
            	var box=$('.box').eq(${proofing_index});
            	box.find('input[name="fold_${proofing_index}"][value="${proofing.foldMethod!}"]').prop('checked',true);
            	if(box.find('input[name="fold_${proofing_index}"]:checked').length==0){
            		if('${proofing.foldMethod!}'){
            			box.find('input[name="fold_${proofing_index}"][value="其他"]').prop('checked',true).parent().addClass('checked');
            			box.find('#fold').val('${proofing.foldMethod!}');
            		}
            	}
            	box.find('input[name="fold_${proofing_index}"][value="${proofing.foldMethod!}"]').parent().addClass('checked');
            	box.find('input[name="package_${proofing_index}"][value="${proofing.packageMethod!}"]').prop('checked',true);
            	if(box.find('input[name="package${proofing_index}"]:checked').length==0){
            		if('${proofing.packageMethod!}'){
            			box.find('input[name="package_${proofing_index}"][value="其他"]').prop('checked',true).parent().addClass('checked');
            			box.find('#package').val('${proofing.packageMethod!}');
            		}
            	}
            	box.find('input[name="package_${proofing_index}"][value="${proofing.packageMethod!}"]').parent().addClass('checked');
            	box.find('input[name="check_${proofing_index}"][value="${proofing.checkStandard!}"]').prop('checked',true);
            	if(box.find('input[name="check_${proofing_index}"]:checked').length==0){
            		if('${proofing.checkStandard!}'){
            			box.find('input[name="check_${proofing_index}"][value="其他"]').prop('checked',true).parent().addClass('checked');
            			box.find('#check').val('${proofing.checkStandard!}');
            		}
            	}
            	box.find('input[name="check_${proofing_index}"][value="${proofing.checkStandard!}"]').parent().addClass('checked');
            	box.find('input[name="batch_${proofing_index}"][value="${proofing.batchMethod!}"]').prop('checked',true);
            	if(box.find('input[name="batch_${proofing_index}"]:checked').length==0){
            		if('${proofing.batchMethod!}'){
            			box.find('input[name="batch_${proofing_index}"][value="其他"]').prop('checked',true).parent().addClass('checked');
            			box.find('#batch').val('${proofing.batchMethod!}');
            		}
            	}
            	box.find('input[name="batch_${proofing_index}"][value="${proofing.batchMethod!}"]').parent().addClass('checked');
            	</#list>
            })
            $(function(){
            	$('.box:not(:first)').hide();
            	for(var i=0;i<$('.box').length;i++){
            		$('.box').eq(i).find('#last').click(showLast);
            		if(i!=$('.box').length-1)
            		$('.box').eq(i).find('#next').click(showNext);
            	}
            })
            function showLast(){
            	var index=$('.box').index($(this).parents('.box'));
            	$(this).parents('.box').hide();
            	$('.box').eq(index-1).show();
            }
            function showNext(){
            	if(!checkParam($(this).parents('.box'))) return false;
            	var index=$('.box').index($(this).parents('.box'));
            	$(this).parents('.box').hide();
            	$('.box').eq(index+1).show();
            }
            $(function(){
            	model.ids='${ids!}';
            	model.index='${index!}';
            	model.proofingOrderId='${proofingOrderId!}';
            	model.id=model.ids.split(',');
            })
            $(function(){
            	<#list proofingPatterns as proofing>
            	var opts=$('.box').eq(${proofing_index}).find('#factoryId').children();
            	for(var i=0;i<opts.length;i++){
            		if(opts.eq(i).val()=='${proofing.factoryId!}'){
            			opts.eq(i).prop('selected',true);
            			break;
            		}
            	}
            	</#list>
            })
        </script>

    </body>
</html>

